package com.ynkbny.web.controller;

import com.ynkbny.base.PageResult;
import com.ynkbny.domain.mongo.DeviceHistoryDataMon;
import com.ynkbny.domain.mongo.DeviceHistoryDataVO;
import com.ynkbny.service.DeviceHistoryDataService;
import com.ynkbny.util.Res;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 属性的历史数据 未查询到的数据
 *
 * @author : juzipi123
 * @date : 2023-8-31
 */
@Slf4j
@Api(tags = "属性的历史数据 未查询到的数据")
@RestController
@RequestMapping("/deviceHistoryDataErr")
public class DeviceHistoryDataController {

    @Resource
    private DeviceHistoryDataService service;

    @GetMapping("/paginQuery")
    @ApiOperation("根据条件分页 查询")
    public Res<PageResult<DeviceHistoryDataMon>> paginQuery(DeviceHistoryDataVO vo) {
        log.info("请求参数:{}",vo);
        PageResult<DeviceHistoryDataMon> result = service.paginQuery(vo);
        log.info("返回值：{}",result);
        return Res.ok(result);
    }

}
